﻿#pragma once
#include <sfse_common/Utilities.h>

#include "sfse/GameEvents.h"

// 0x500
class UI
{
public:
    UI() { }
    virtual ~UI() { }
    
    MEMBER_FN_PREFIX(UI);
    DEFINE_MEMBER_FN(GetMenuOpen, bool, 0x02E7095C, const BSFixedString& name); // 1 7 23 2E70CAC 1 7 29 2E7095C

    bool GetMenuOpen(const BSFixedString& name)
    {
        return CALL_MEMBER_FN(this, GetMenuOpen)(name);
    };

    u64 unk08;
    BSTEventSource<MenuOpenCloseEvent> menuOpenCloseEventSource;
    BSTEventSource<MenuModeChangeEvent> menuModeChangeEventSource;
    BSTEventSource<MenuPauseChangeEvent> menuPauseChangeEventSource;
    BSTEventSource<MenuPauseCounterChangeEvent> menuPauseCounterChangeEvent;
    BSTEventSource<TutorialEvent> tutorialEventSource;
    BSTEventSource<BSCursorTypeChange> bSCursorTypeChangeSource;
    BSTEventSource<BSCursorRotationChange> bSCursorRotationChangeSource;
    BSTEventSource<BIUIMenuVisiblePausedBeginEvent> bIUIMenuVisiblePausedBeginEvent;
    BSTEventSource<BIUIMenuVisiblePausedEndEvent> bIUIMenuVisiblePausedEndEvent;
};
static_assert(sizeof(UI) == 0x178);
//0x478 numPauseGame ?

extern RelocPtr <UI*> g_UI; // 1 7 23 56ED258 1 7 29 56EE0D0